#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time


def time_usage(func):
    """
    耗时装饰器
    :param func: 函数
    :return: 调用结果
    """
    def wrapper(*args, **kwargs):
        start = time.time()
        func(*args, **kwargs)
        end = time.time()
        used = end - start
        print(f'{func.__name__} used: {used}')

    return wrapper